package cn.edu.neusoft.maxingxin231.yuejian06.Model;

import cn.edu.neusoft.maxingxin231.yuejian06.Bean.RegisterBean;
import cn.edu.neusoft.maxingxin231.yuejian06.Iface.AlterUserIface;
import cn.edu.neusoft.maxingxin231.yuejian06.Iface.RegisterIface;
import cn.edu.neusoft.maxingxin231.yuejian06.Listener.LoginListener;
import cn.edu.neusoft.maxingxin231.yuejian06.Service.LoginService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class AlterUserinfoModel extends RetrofitBaseModel implements AlterUserIface<RegisterBean> {
    private Retrofit retrofit;
    private LoginService loginService;

    public AlterUserinfoModel(){
        retrofit = getRetrofit();
        loginService = getLoginService();
    }

    @Override
    public void updateName(String user_id, String user_name, LoginListener<RegisterBean> loginListener) {
        Call<RegisterBean> call = loginService.updatename(user_id,user_name);
        callenqueue(call,loginListener);
    }

    @Override
    public void updatePassword(String user_id, String user_password, LoginListener<RegisterBean> loginListener) {
        Call<RegisterBean> call = loginService.updatepassword(user_id,user_password);
        callenqueue(call,loginListener);

    }
}
